<template>
  <basic-container>
    <rehydration-ticket-list v-show="showType==='list'" @detail="handleDetail"/>
    <rehydration-ticket-detail v-if="showType==='detail'" @back="handleBack" :detail="detail"/>
  </basic-container>
</template>

<script>
import RehydrationTicketList
  from "@/views/inventory/rehydration-ticket/components/rehydration-ticket-list";
import RehydrationTicketDetail
  from "@/views/inventory/rehydration-ticket/components/rehydration-ticket-detail";

export default {
  name: "index",
  components: {RehydrationTicketDetail, RehydrationTicketList},
  data() {
    return {
      showType: 'list',
      detail: {}
    }
  },
  methods: {
    handleBack() {
      this.showType = 'list'
    },
    handleDetail(_row) {
      this.showType = 'detail'
      this.detail = _row
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
